import os

# 请求头
post_headers = {
    'Accept': 'application/json, text/plain, */*',
    'Accept-Encoding': 'gzip, deflate, br, zstd',
    'Accept-Language': 'zh-CN,zh;q=0.9',
    'Content-Type': 'application/json',
    'Origin': 'https://webofscience.clarivate.cn',
    'Referer': 'https://webofscience.clarivate.cn/wos/alldb/summary/3020fc02-4774-40ba-9c0a-dcc2d6a4f026-dd7278b6/relevance/1(overlay:export/exc)',
    'Sec-Ch-Ua': '"Microsoft Edge";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
    'Sec-Ch-Ua-Mobile': '?0',
    'Sec-Ch-Ua-Platform': '"Windows"',
    'Sec-Fetch-Dest': 'empty',
    'Sec-Fetch-Mode': 'cors',
    'Sec-Fetch-Site': 'same-origin',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0',
    'X-1p-Wos-Sid': 'USW2EC0F69soHFElpPZTPjyA6gOgp'
}
# 原post负载数据
# post_data = {
#     "parentQid": "3020fc02-4774-40ba-9c0a-dcc2d6a4f026-dd7278b6",
#     "sortBy": "relevance",
#     "displayTimesCited": "true",
#     "displayCitedRefs": "true",
#     "product": "UA",
#     "colName": "ALLDB",
#     "displayUsageInfo": "true",
#     "fileOpt": "xls",
#     "action": "saveToExcel",
#     "markFrom": "1",
#     "markTo": "1",
#     "view": "summary",
#     "isRefQuery": "false",
#     "locale": "en_US",
#     "fieldList": [
#         "AUTHORS",
#         "TITLE",
#         "SOURCE",
#         "CITTIMES",
#         "ACCESSION_NUM",
#         "ABSTRACT",
#         "AUTHORSIDENTIFIERS",
#         "ISSN_ISBN",
#         "PMID",
#         "CONFERENCE_INFO_SPONSORS",
#         "USAGEIND"
#     ]
# }


# post 负载数据
post_data = {
    "parentQid": "3020fc02-4774-40ba-9c0a-dcc2d6a4f026-dd7278b6",
    "sortBy": "relevance",
    "displayTimesCited": "true",
    "displayCitedRefs": "true",
    "product": "UA",
    "colName": "WOS",###
    "displayUsageInfo": "true",
    "fileOpt": "xls",
    "action": "saveToExcel",
    "markFrom": "1",
    "markTo": "1",
    "view": "fullrec",
    "isRefQuery": "false",
    "locale": "en_US",
    "fieldList": [
        "CITREF",
        "CITREFC",
        "USAGEIND",
        "HOT_PAPER",
        "HIGHLY_CITED",
        "FUNDING",
        "PUBINFO",
        "OPEN_ACCESS",
        "PAGEC",
        "SABBR",
        "IDS",
        "LANG",
        "ABSTRACT",
        "ADDRS",
        "AFFILIATIONS",
        "DOCTYPE",
        "KEYWORDS",
        "JCR_CATEGORY",
        "SUBJECT_CATEGORY",
        "WOS_EDITIONS",
        "AUTHORS",
        "TITLE",
        "SOURCE",
        "CONFERENCE_INFO",
        "CITTIMES",
        "ACCESSION_NUM",
        "AUTHORSIDENTIFIERS",
        "ISSN",
        "PMID"
    ]

}


# 日志状态
log_states = {
    'INFO': '信息',
    'WARNING': '警告',
    'ERROR': '错误',
    'FATAL': '失败'
}
# Edge 浏览器驱动路径
edge_path = r"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
# 请求的 url
xls_post_url = 'https://webofscience.clarivate.cn/api/wosnx/indic/export/saveToFile'
# 文件保存路径
file_save_path = os.path.join(os.path.dirname(__file__), '../../../static/data')
